﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Stp.Core;

namespace Stp.Test.Fakes
{
    public class FakeAccount : IAccount
    {
        public bool RetVerifyData;
        public bool SetException;
        public bool LoginSuccessful;

        public bool VerifyData()
        {
            return RetVerifyData;
        }

        public void Register()
        {
            if (SetException)
            {
                throw new Exception("Test Exception.");
            }
        }

        public bool Login()
        {
            if (!SetException)
            {
                return LoginSuccessful;
            }
            else
            {
                throw new Exception("Test Exception.");
            }
        }

        public void Logout()
        {
            if (SetException)
            {
                throw new Exception("Test Exception.");
            }
        }
    }
}
